// 验证
import Cookies from 'js-cookie'
// 和setLocalstroge差不多
const TokenKey = 'hrsaas-ihrm-token'
export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

// 处理 Cookies 时间记录的函数
const timeKey = 'timestamp'

export function setTimestamp() {
  Cookies.set(timeKey, Date.now())
}
export function getTimestamp() {
  return Cookies.get(timeKey)
}

